//
// Created by Administrator on 2023/7/31.
//
#include <iostream>

using namespace std;


class Solution {
public:
    int percentageLetter(string s, char letter) {
        int n = s.size();
        int counter = 0;
        for (auto x: s) {
            if (x == letter)
                counter++;
        }
        return int(100* counter / n );

    }
};


int main() {
    Solution s;
    cout << s.percentageLetter("foobar", 'o') << endl;
    cout << s.percentageLetter("jjjj", 'k') << endl;

}